package com.lian.anlimall.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lian.anlimall.order.entity.OrderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * 订单
 * 

 * @email HeJieLin@anlimall.com
 * @date 2021-04-22 19:49:53
 */
@Mapper
public interface OrderDao extends BaseMapper<OrderEntity> {

    /**
     * 修改订单状态
     * @param orderSn
     * @param code
     * @param payType
     */
    void updateOrderStatus(@Param("orderSn") String orderSn,
                           @Param("code") Integer code,
                           @Param("payType") Integer payType);

    void updateOrderStatusbyShouhuo(@Param("id") Long id);

    int selectyesterdayVolume();

    int selectTodayVolume();

    int selectTotalVolume();



    BigDecimal selectYesterdaySalesAmount();

    BigDecimal selectTodaydaySalesAmount();

    BigDecimal selectTotalSalesAmount();

    int selectSevendayVolume();

    BigDecimal selectSevendaySalesAmount();


    Integer selectOrderByDaifahuo(@Param("i") int i);
}
